// const rzztDic = { //融资状态字典
//     0:'发起申请',
//     1:'征信公司审核',
//     2:'征信公司拒绝',
//     3:'银行已接收',
//     4:'银行拒绝',
//     5:'银行待放款',
//     6:'银行已放款'
// }
import {
    updateFile
} from '@/api/manager.js'
import axios from 'axios'
import store from '@/store'
const liucDic = { //流程状态字典
    // 0:'发起申请',
    // 1:'平台已拒绝',
    // 2:'平台审核通过',
    // 3:'待放款',
    // 4:'金融机构已放款',
    // 5:'金融机构已拒绝',
    0: '平台审核中',
    1: '平台拒绝',
    2: '金融机构审核中',
    3: '待放款',
    4: '已放款',
    5: '金融机构拒绝',
    6: '还款成功'
}

const liuDic_zx = { //融资状态字 - 征信 
    1: '平台拒绝',
    2: '金融机构审核中',
    3: '待放款',
    4: '已放款',
    5: '金融机构拒绝',
    6: '还款成功'
}

const liuDic_org = { //融资状态字 - 金融机构
    3: '待放款',
    4: '已放款',
    5: '金融机构拒绝',
    6: '还款成功'
}

const activeList = { //融资步骤条对应activve
    // 0:1,
    // 1:1,
    // 2:2,
    // 3:3,
    // 4:4,
    // 5:2
    0: 2,
    1: 2,
    2: 3,
    3: 4,
    4: 5,
    5: 3,
    6: 5,
}

const rzStatusDic = { //发布人实名认证状态
    0: '未认证',
    1: '认证成功',
    2: '认证失败',
}


const rzStatusDic_zx = { //发布人实名认证状态-征信公司
    1: '认证成功',
    2: '认证审核中',
}

const sqStatusDic = { //企业授权状态
    0: '待提交',
    1: '授权成功',
    2: '审批中',
    3: '授权失败'
}

const sqStatusDic_zx = { //企业授权状态-征信公司
    1: '授权成功',
    2: '授权审核中',
}


const qyRzStatusDic = {//企业认证状态
    0: '未认证',
    1: '认证成功',
    2: '认证审核中',
    3: '认证审核失败'
}

const createStepList = (data = {}) => {
    return [
        {
            text: data.page === 'rz' ? '提交融资申请' : '提交融资意向',
            show: [0, 1, 2, 3, 4, 5, 6]
        },
        {
            text: '平台审核中',
            show: [0],
        },
        {
            text: '平台已拒绝',
            show: [1],
        },
        {
            text: '平台审核通过',
            show: [2, 3, 4, 5, 6],
        },
        {
            text: '金融机构审核',
            show: [1,2],
        },
        {
            text: '金融机构拒绝',
            show: [5],
        },
        {
            text: '金融机构审核通过',
            show: [0, 3, 4, 6],
        },
        {
            text: '放款',
            show: [0, 1, 2, 5, 6],
        },
        {
            text: '待放款',
            show: [3],
        },
        {
            text: '已放款',
            show: [4],
        },
        {
            text: '还款',
            show: [1,2,3, 5],
        },
        {
            text: '还款中',
            show: [4],
        },
        {
            text: '还款成功',
            show: [6],
        }
    ];
}

const createTableData_orgFinanceApply_verify = (row) => {
    const { qymc, SHTYXYDM, FDDBR, name, product_name, XQJE, RZYT, APPLY_TIME } = row
    return [{
        tabsLabel: '基本信息',
        table: [
            [{
                width: '15%',
                value: '企业名称'
            },
            {
                width: '35%',
                value: qymc
            },
            {
                width: '15%',
                value: '统一社会信用代码'
            },
            {
                width: '35%',
                value: SHTYXYDM
            }],
            [{
                width: '15%',
                value: '法人姓名'
            },
            {
                width: '35%',
                value: FDDBR
            },
            {
                width: '15%',
                value: '发布人'
            },
            {
                width: '35%',
                value: name
            }],
        ]
    },
    {
        tabsLabel: '需求信息',
        table: [
            [{
                width: '15%',
                value: '申请产品'
            },
            {
                width: '35%',
                value: product_name
            },
            {
                width: '15%',
                value: '需求金额（万元）'
            },
            {
                width: '35%',
                value: XQJE
            }],
            [{
                width: '15%',
                value: '资金用途'
            },
            {
                width: '35%',
                value: RZYT
            },
            {
                width: '15%',
                value: '发布时间'
            },
            {
                width: '35%',
                value: APPLY_TIME ? APPLY_TIME.slice(0,11) : APPLY_TIME
            }],
        ]
    }]
}
const org_rzyx_sh = (row) => {
    const { qymc, SHTYXYDM, FDDBR, name, pnumber, XQJE, RZYT, APPLY_TIME } = row
    return [{
        tabsLabel: '基本信息',
        table: [
            [{
                width: '15%',
                value: '企业名称'
            },
            {
                width: '35%',
                value: qymc
            },
            {
                width: '15%',
                value: '统一社会信用代码'
            },
            {
                width: '35%',
                value: SHTYXYDM
            }],
            [{
                width: '15%',
                value: '法人姓名'
            },
            {
                width: '35%',
                value: FDDBR
            },
            {
                width: '15%',
                value: '发布人'
            },
            {
                width: '35%',
                value: name
            }],
            [{
                width: '15%',
                value: '发布人联系方式'
            },
            {
                width: '35%',
                value: pnumber
            }],
        ]
    },
    {
        tabsLabel: '需求信息',
        table: [
            [{
                width: '15%',
                value: '需求金额（万元）'
            },
            {
                width: '35%',
                value: XQJE
            }, {
                width: '15%',
                value: '资金用途'
            },
            {
                width: '35%',
                value: RZYT
            }],
            [{
                width: '15%',
                value: '发布时间'
            },
            {
                width: '35%',
                value: APPLY_TIME ? APPLY_TIME.slice(0,11) : APPLY_TIME
            }],
        ]
    }]
}
const org_rzsq_sh = (row) => {
    const { qymc, SHTYXYDM, FDDBR, name, pnumber, XQJE, RZYT, APPLY_TIME, product_name } = row
    return [{
        tabsLabel: '基本信息',
        table: [
            [{
                width: '15%',
                value: '企业名称'
            },
            {
                width: '35%',
                value: qymc
            },
            {
                width: '15%',
                value: '统一社会信用代码'
            },
            {
                width: '35%',
                value: SHTYXYDM
            }],
            [{
                width: '15%',
                value: '法人姓名'
            },
            {
                width: '35%',
                value: FDDBR
            },
            {
                width: '15%',
                value: '发布人'
            },
            {
                width: '35%',
                value: name
            }],
            [{
                width: '15%',
                value: '发布人联系方式'
            },
            {
                width: '35%',
                value: pnumber
            }],
        ]
    },
    {
        tabsLabel: '需求信息',
        table: [
            [{
                width: '15%',
                value: '申请产品'
            },
            {
                width: '35%',
                value: product_name
            }, {
                width: '15%',
                value: '需求金额（万元）'
            },
            {
                width: '35%',
                value: XQJE
            }],
            [{
                width: '15%',
                value: '资金用途'
            },
            {
                width: '35%',
                value: RZYT
            }, {
                width: '15%',
                value: '发布时间'
            },
            {
                width: '35%',
                value: APPLY_TIME ? APPLY_TIME.slice(0,11) : APPLY_TIME
            }],
        ]
    }]
}
const org_rzsq_sh_jq = (row) => {
    const { qymc, SHTYXYDM, FDDBR, name, pnumber, XQJE, RZYT, RZZT, APPLY_TIME, product_name, SXED, SXYXQ,FKCP
        , FKJE, FKRQ, CJLVLX, CJLV, HKQX, HKFS,ZDYQ,HKRQ,lv_type,org_name
    } = row
    return [{
        tabsLabel: '基本信息',
        table: [
            [{
                width: '15%',
                value: '企业名称'
            },
            {
                width: '35%',
                value: qymc
            },
            {
                width: '15%',
                value: '统一社会信用代码'
            },
            {
                width: '35%',
                value: SHTYXYDM
            }],
            [{
                width: '15%',
                value: '法人姓名'
            },
            {
                width: '35%',
                value: FDDBR
            },
            {
                width: '15%',
                value: '发布人'
            },
            {
                width: '35%',
                value: name
            }],
            [{
                width: '15%',
                value: '发布人联系方式'
            },
            {
                width: '35%',
                value: pnumber
            }],
        ]
    },
    {
        tabsLabel: '需求信息',
        table: [
            [{
                width: '15%',
                value: '申请产品'
            },
            {
                width: '35%',
                value: product_name
            },{
                width: '15%',
                value: '需求金额（万元）'
            },
            {
                width: '35%',
                value: XQJE
            }],
            [{
                width: '15%',
                value: '资金用途'
            },
            {
                width: '35%',
                value: RZYT
            },{
                width: '15%',
                value: '发布时间'
            },
            {
                width: '35%',
                value: APPLY_TIME ? APPLY_TIME.slice(0,11) : APPLY_TIME
            }],
        ]
    }, {
        tabsLabel: '受理情况',
        table: [
            [{
                width: '15%',
                value: '状态'
            },
            {
                width: '35%',
                value: liucDic[RZZT]
            }, {
                width: '15%',
                value: '受理机构'
            },
            {
                width: '35%',
                value: org_name
            }],
            [{
                width: '15%',
                value: '授信额度(万元)'
            },
            {
                width: '35%',
                value: SXED
            }, {
                width: '15%',
                value: '授信额有效期至'
            },
            {
                width: '35%',
                value: SXYXQ ? SXYXQ.slice(0,11) : SXYXQ
            }],
            [{
                width: '15%',
                value: '金融产品'
            },
            {
                width: '35%',
                value: FKCP
            }, {
                width: '15%',
                value: '放款金融(万元)'
            },
            {
                width: '35%',
                value: FKJE
            }],
            [{
                width: '15%',
                value: '放款时间'
            },
            {
                width: '35%',
                value: FKRQ ? FKRQ.slice(0,11) : FKRQ
            }, {
                width: '15%',
                value: '成交利率类型'
            },
            {
                width: '35%',
                value: lv_type || cjlvMyObj[CJLVLX]
            }],
            [{
                width: '15%',
                value: '成交利率(%)'
            },
            {
                width: '35%',
                value: CJLV
            }, {
                width: '15%',
                value: '还款期限(个月)'
            },
            {
                width: '35%',
                value: HKQX
            }],
            [{
                width: '15%',
                value: '还款方式'
            },
            {
                width: '35%',
                value: hkfsMobj[HKFS] || HKFS
            }],
        ]
    },
    {
        tabsLabel: '还款信息',
        table: [
            [{
                width: '15%',
                value: '贷款结清时间'
            },
            {
                width: '35%',
                value:  HKRQ ? HKRQ.slice(0,11): HKRQ
            }, {
                width: '15%',
                value: '最大逾期天数(天)'
            },
            {
                width: '35%',
                value: ZDYQ
            }]
        ]
    }
    ]
}

const org_rzsq_sh_jq_two = (row) => {
    const { qymc, SHTYXYDM, FDDBR, name, pnumber, XQJE, RZYT, RZZT, APPLY_TIME, product_name, SXED, SXYXQ,FKCP
        , FKJE, FKRQ, CJLVLX, CJLV, HKQX, HKFS,ZDYQ,HKRQ,lv_type,org_name
    } = row
    return [{
        tabsLabel: '基本信息',
        table: [
            [{
                width: '15%',
                value: '企业名称'
            },
            {
                width: '35%',
                value: qymc
            },
            {
                width: '15%',
                value: '统一社会信用代码'
            },
            {
                width: '35%',
                value: SHTYXYDM
            }],
            [{
                width: '15%',
                value: '法人姓名'
            },
            {
                width: '35%',
                value: FDDBR
            },
            {
                width: '15%',
                value: '发布人'
            },
            {
                width: '35%',
                value: name
            }],
            [{
                width: '15%',
                value: '发布人联系方式'
            },
            {
                width: '35%',
                value: pnumber
            }],
        ]
    },
    {
        tabsLabel: '需求信息',
        table: [
            [{
                width: '15%',
                value: '需求金额（万元）'
            },
            {
                width: '35%',
                value: XQJE
            }, {
                width: '15%',
                value: '资金用途'
            },
            {
                width: '35%',
                value: RZYT
            }],
            [{
                width: '15%',
                value: '发布时间'
            },
            {
                width: '35%',
                value: APPLY_TIME ? APPLY_TIME.slice(0,11) : APPLY_TIME
            }],
        ]
    }, {
        tabsLabel: '受理情况',
        table: [
            [{
                width: '15%',
                value: '状态'
            },
            {
                width: '35%',
                value: liucDic[RZZT]
            }, {
                width: '15%',
                value: '受理机构'
            },
            {
                width: '35%',
                value: org_name
            }],
            [{
                width: '15%',
                value: '授信额度(万元)'
            },
            {
                width: '35%',
                value: SXED
            }, {
                width: '15%',
                value: '授信额有效期至'
            },
            {
                width: '35%',
                value: SXYXQ ? SXYXQ.slice(0,11) : SXYXQ
            }],
            [{
                width: '15%',
                value: '金融产品'
            },
            {
                width: '35%',
                value: FKCP
            }, {
                width: '15%',
                value: '放款金融(万元)'
            },
            {
                width: '35%',
                value: FKJE
            }],
            [{
                width: '15%',
                value: '放款时间'
            },
            {
                width: '35%',
                value: FKRQ ? FKRQ.slice(0,11) : FKRQ
            }, {
                width: '15%',
                value: '成交利率类型'
            },
            {
                width: '35%',
                value: cjlvMyObj[CJLVLX] || lv_type
            }],
            [{
                width: '15%',
                value: '成交利率(%)'
            },
            {
                width: '35%',
                value: CJLV
            }, {
                width: '15%',
                value: '还款期限(个月)'
            },
            {
                width: '35%',
                value: HKQX
            }],
            [{
                width: '15%',
                value: '还款方式'
            },
            {
                width: '35%',
                value: hkfsMobj[HKFS] || HKFS
            }],
        ]
    },
    {
        tabsLabel: '还款信息',
        table: [
            [{
                width: '15%',
                value: '贷款结清时间'
            },
            {
                width: '35%',
                value:  HKRQ ? HKRQ.slice(0,11): HKRQ
            }, {
                width: '15%',
                value: '最大逾期天数(天)'
            },
            {
                width: '35%',
                value: ZDYQ
            }]
        ]
    }
    ]
}
const createTableData_creditFinanceIntention = (row) => {//
    const { qymc, SHTYXYDM, FDDBR, name, product_name, XQJE, RZYT, APPLY_TIME, bank } = row
    return [{
        tabsLabel: '基本信息',
        table: [
            [{
                width: '15%',
                value: '企业名称'
            },
            {
                width: '35%',
                value: qymc
            },
            {
                width: '15%',
                value: '统一社会信用代码'
            },
            {
                width: '35%',
                value: SHTYXYDM
            }],
            [{
                width: '15%',
                value: '法人姓名'
            },
            {
                width: '35%',
                value: FDDBR
            },
            {
                width: '15%',
                value: '发布人'
            },
            {
                width: '35%',
                value: name
            }],
            [{
                width: '15%',
                value: '授权渠道'
            },
            {
                width: '35%',
                value: bank
            }],
        ]
    }]
}
const credit_rzsq_sqsh = (row) => {//
    const { qymc, SHTYXYDM, FDDBR, name, product_name, XQJE, RZYT, APPLY_TIME, bank } = row
    return [{
        tabsLabel: '基本信息',
        table: [
            [{
                width: '15%',
                value: '企业名称'
            },
            {
                width: '35%',
                value: qymc
            },
            {
                width: '15%',
                value: '统一社会信用代码'
            },
            {
                width: '35%',
                value: SHTYXYDM
            }],
            [{
                width: '15%',
                value: '法人姓名'
            },
            {
                width: '35%',
                value: FDDBR
            },
            {
                width: '15%',
                value: '授权渠道'
            },
            {
                width: '35%',
                value: bank
            }]
        ]
    }]
}
const hkfsMobj = {
    debx: '等额本息',
    debj: '等额本金',
    ycxhbfx: '一次性还本付息',
    aqfxhb: '按期付息还本',
}
const cjlvMyObj = {
    nll: '年利率',
    yll: '月利率',
    rll: '日利率',
}
const org_rzyx_ck = (row) => { //org_rzyx_ck
    const _data = org_rzyx_sh(row)
    const { RZZT, FKCP, FKJE, FKRQ, product_name, XQJE, remark,lv_type,
        REMARK, UPDATE_TIME, org_name, CJLVLX, CJLV, HKFS, HKQX,SXYXQ,SXED
    } = row
    let table = []
    if (RZZT === 4) { //已放款
        table = [
            [{
                width: '15%',
                value: '状态'
            },
            {
                width: '35%',
                value: liucDic[RZZT]
            },
            {
                width: '15%',
                value: '受理机构'
            },
            {
                width: '35%',
                value: org_name
            }],
            [{
                width: '15%',
                value: '授信额度(万元)'
            },
            {
                width: '35%',
                value: SXED
            },
            {
                width: '15%',
                value: '授信额度有效期至'
            },
            {
                width: '35%',
                value: SXYXQ ? SXYXQ.slice(0,11) : SXYXQ
            }],
            [{
                width: '15%',
                value: '金融产品'
            },
            {
                width: '35%',
                value: FKCP
            },
            {
                width: '15%',
                value: '放款金额(万元)'
            },
            {
                width: '35%',
                value: FKJE
            }],
            [{
                width: '15%',
                value: '放款时间'
            },
            {
                width: '35%',
                value: FKRQ ? FKRQ.slice(0,11) : FKRQ 
            },
            {
                width: '15%',
                value: '成交利率类型'
            },
            {
                width: '35%',
                value: cjlvMyObj[CJLVLX] || lv_type
            }],
            [{
                width: '15%',
                value: '成交利率(%)'
            },
            {
                width: '35%',
                value: CJLV
            }, {
                width: '15%',
                value: '还款期限(个月)'
            },
            {
                width: '35%',
                value: HKQX
            }],
            [{
                width: '15%',
                value: '还款方式'
            },
            {
                width: '35%',
                value: hkfsMobj[HKFS] || HKFS
            }]
        ]
    } else if (RZZT === 3) {
        table = [
            [{
                width: '15%',
                value: '状态'
            },
            {
                width: '35%',
                value: liucDic[RZZT]
            },
            {
                width: '15%',
                value: '受理机构'
            },
            {
                width: '35%',
                value: org_name
            }],
            [{
                width: '15%',
                value: '授信额度(万元)'
            },
            {
                width: '35%',
                value: SXED
            },
            {
                width: '15%',
                value: '授信额度有效期至'
            },
            {
                width: '35%',
                value: SXYXQ ? SXYXQ.slice(0,11) : SXYXQ
            }],
        ]
    } else {
        table = [
            [{
                width: '15%',
                value: '状态'
            },
            {
                width: '35%',
                value: liucDic[RZZT]
            },
            {
                width: '15%',
                value: '受理机构'
            },
            {
                width: '35%',
                value: org_name
            }],
            [{
                width: '15%',
                value: '审核时间'
            },
            {
                width: '35%',
                value:UPDATE_TIME ? UPDATE_TIME.slice(0,11) :UPDATE_TIME
            },
            {
                width: '15%',
                value: '备注'
            },
            {
                width: '35%',
                value: REMARK
            }],
        ]
    }
    const data = [{
        tabsLabel: '受理情况',
        table
    }]
    return [..._data, ...data]
}
const org_rzsq_ck = (row) => { //org_rzyx_ck
    const _data = org_rzsq_sh(row)
    const { RZZT, FKCP, FKJE, FKRQ, product_name, XQJE, remark,
        REMARK, UPDATE_TIME, org_name, CJLVLX, CJLV, HKQX, HKFS, SXYXQ, SXED,lv_type
    } = row
    let table = []
    if (RZZT === 4 || RZZT === 6) { //已放款
        table = [
            [{
                width: '15%',
                value: '状态'
            },
            {
                width: '35%',
                value: liucDic[RZZT]
            },
            {
                width: '15%',
                value: '受理机构'
            },
            {
                width: '35%',
                value: org_name
            }],
            [{
                width: '15%',
                value: '授信额度(万元)'
            },
            {
                width: '35%',
                value: SXED
            },
            {
                width: '15%',
                value: '授信额度有效期至'
            },
            {
                width: '35%',
                value: SXYXQ ? SXYXQ.slice(0,11) : SXYXQ
            }],
            [{
                width: '15%',
                value: '金融产品'
            },
            {
                width: '35%',
                value: FKCP
            },
            {
                width: '15%',
                value: '放款金额(万元)'
            },
            {
                width: '35%',
                value: FKJE
            }],
            [{
                width: '15%',
                value: '放款时间'
            },
            {
                width: '35%',
                value: FKRQ ? FKRQ.slice(0,11) : FKRQ 
            }, {
                width: '15%',
                value: '成交利率类型'
            },
            {
                width: '35%',
                value: lv_type || cjlvMyObj[CJLVLX]
            }],
            [{
                width: '15%',
                value: '成交利率(%)'
            },
            {
                width: '35%',
                value: CJLV
            }, {
                width: '15%',
                value: '还款期限(个月)'
            },
            {
                width: '35%',
                value: HKQX
            }],
            [{
                width: '15%',
                value: '还款方式'
            },
            {
                width: '35%',
                value: hkfsMobj[HKFS] || HKFS
            }]
        ]
    } else if (RZZT === 3) {
        table = [
            [{
                width: '15%',
                value: '状态'
            },
            {
                width: '35%',
                value: liucDic[RZZT]
            },
            {
                width: '15%',
                value: '受理机构'
            },
            {
                width: '35%',
                value: org_name
            }],
            [{
                width: '15%',
                value: '授信额度(万元)'
            },
            {
                width: '35%',
                value: SXED
            },
            {
                width: '15%',
                value: '授信额度有效期至'
            },
            {
                width: '35%',
                value: SXYXQ ? SXYXQ.slice(0,11) : SXYXQ
            }]
        ]
    } else {
        table = [
            [{
                width: '15%',
                value: '状态'
            },
            {
                width: '35%',
                value: liucDic[RZZT]
            },
            {
                width: '15%',
                value: '受理机构'
            },
            {
                width: '35%',
                value: org_name
            }],
            [{
                width: '15%',
                value: '审核时间'
            },
            {
                width: '35%',
                value: UPDATE_TIME ? UPDATE_TIME.slice(0,11) : UPDATE_TIME
            },
            {
                width: '15%',
                value: '备注'
            },
            {
                width: '35%',
                value: REMARK
            }],
        ]
    }
    const data = [{
        tabsLabel: '受理情况',
        table
    }]

    return [..._data, ...data]
}

const createTableData_orgFinanceApply_view = (row) => { //org_rzyx_ck
    const _data = createTableData_orgFinanceApply_verify(row)
    const { RZZT, SHTYXYDM, FDDBR, name, product_name, XQJE, remark, REMARK, UPDATE_TIME, org_name } = row
    const data = [{
        tabsLabel: '受理情况',
        table: [
            [{
                width: '15%',
                value: '状态'
            },
            {
                width: '35%',
                value: liucDic[RZZT]
            },
            {
                width: '15%',
                value: '受理机构'
            },
            {
                width: '35%',
                value: org_name
            }],
            [{
                width: '15%',
                value: '审核时间'
            },
            {
                width: '35%',
                value:UPDATE_TIME? UPDATE_TIME.slice(0,11): UPDATE_TIME
            },
            {
                width: '15%',
                value: '备注'
            },
            {
                width: '35%',
                value: remark || REMARK
            }],
        ]
    }]
    return [..._data, ...data]
}
const createTableData_creditFinanceApply_view = (row) => {
    console.log('createTableData_creditFinanceApply_view', row)
    const _data = createTableData_orgFinanceApply_verify(row)
    const { RZZT, SHTYXYDM, FDDBR, name, product_name, XQJE, remark, REMARK, UPDATE_TIME, org_name } = row
    const data = [{
        tabsLabel: '受理情况',
        table: [
            [{
                width: '15%',
                value: '状态'
            },
            {
                width: '35%',
                value: liucDic[RZZT]
            },
            {
                width: '15%',
                value: '受理机构'
            },
            {
                width: '35%',
                value: org_name
            }],
            [{
                width: '15%',
                value: '审核时间'
            },
            {
                width: '35%',
                value: UPDATE_TIME ? UPDATE_TIME.slice(0,11) : UPDATE_TIME
            },
            {
                width: '15%',
                value: '备注'
            },
            {
                width: '35%',
                value: remark || REMARK
            }],
        ]
    }]
    return [..._data, ...data]
}
// const credit_rzyx_ck_base = (row) => {

// }
const credit_rzyx_ck = (row) => {
    console.log('createTableData_creditFinanceApply_view', row)
    const _data = org_rzyx_sh(row)
    const { RZZT, FKCP, FKRQ, FKJE, REMARK, UPDATE_TIME, org_name, CREATE_TIME,
        CJLVLX, CJLV, HKFS, HKQX,lv_type,SXED,SXYXQ } = row
    let table = []
    if (RZZT === 1) { //平台拒绝
        table = [
            [{
                width: '15%',
                value: '状态'
            },
            {
                width: '35%',
                value: liucDic[RZZT]
            },
            {
                width: '15%',
                value: '审核时间'
            },
            {
                width: '35%',
                value: UPDATE_TIME? UPDATE_TIME.slice(0,11) :UPDATE_TIME
            }],
            [{
                width: '15%',
                value: '备注'
            },
            {
                width: '35%',
                value: REMARK
            }]
        ]

    } else if (RZZT === 2) {
        table = [
            [{
                width: '15%',
                value: '状态'
            },
            {
                width: '35%',
                value: liucDic[RZZT]
            },
            {
                width: '15%',
                value: '受理机构'
            },
            {
                width: '35%',
                value: org_name
            }]
        ]
    }else if(RZZT === 3){
        table = [
            [{
                width: '15%',
                value: '状态'
            },
            {
                width: '35%',
                value: liucDic[RZZT]
            },
            {
                width: '15%',
                value: '受理机构'
            },
            {
                width: '35%',
                value: org_name
            }],[{
                width: '15%',
                value: '授信额度(万元)'
            },
            {
                width: '35%',
                value: SXED
            },
            {
                width: '15%',
                value: '授信额度有效期至'
            },
            {
                width: '35%',
                value: SXYXQ ? SXYXQ.slice(0,11) : SXYXQ
            }]
        ]

    } else if (RZZT === 5) {
        table = [
            [{
                width: '15%',
                value: '状态'
            },
            {
                width: '35%',
                value: liucDic[RZZT]
            },
            {
                width: '15%',
                value: '受理机构'
            },
            {
                width: '35%',
                value: org_name
            }],
            [{
                width: '15%',
                value: '审核时间'
            },
            {
                width: '35%',
                value: UPDATE_TIME? UPDATE_TIME.slice(0,11): UPDATE_TIME
            },
            {
                width: '15%',
                value: '备注'
            },
            {
                width: '35%',
                value: REMARK
            }],
        ]
    } else {
        table = [
            [{
                width: '15%',
                value: '状态'
            },
            {
                width: '35%',
                value: liucDic[RZZT]
            },
            {
                width: '15%',
                value: '受理机构'
            },
            {
                width: '35%',
                value: org_name
            }],
            [{
                width: '15%',
                value: '授信额度(万元)'
            },
            {
                width: '35%',
                value: SXED
            },
            {
                width: '15%',
                value: '授信额度有效期至'
            },
            {
                width: '35%',
                value: SXYXQ ? SXYXQ.slice(0,11) : SXYXQ
            }],
            [{
                width: '15%',
                value: '金融产品'
            },
            {
                width: '35%',
                value: FKCP
            },
            {
                width: '15%',
                value: '放款金额(万元)'
            },
            {
                width: '35%',
                value: FKJE
            }],
            [{
                width: '15%',
                value: '放款时间'
            },
            {
                width: '35%',
                value: FKRQ ?  FKRQ.slice(0,11) : FKRQ
            }, {
                width: '15%',
                value: '成交利率类型'
            },
            {
                width: '35%',
                value: lv_type || cjlvMyObj[CJLVLX]
            }],
            [{
                width: '15%',
                value: '成交利率(%)'
            },
            {
                width: '35%',
                value: CJLV
            }, {
                width: '15%',
                value: '还款期限(个月)'
            },
            {
                width: '35%',
                value: HKQX
            }],
            [{
                width: '15%',
                value: '还款方式'
            },
            {
                width: '35%',
                value: hkfsMobj[HKFS] || HKFS
            }]
        ]
    }
    const data = [{
        tabsLabel: '受理情况',
        table
    }]
    return [..._data, ...data]
}
const credit_rzsq_ck = (row) => {
    console.log('createTableData_creditFinanceApply_view', row)
    const _data = org_rzsq_sh(row)
    const { RZZT, FKCP, FKRQ, FKJE, REMARK, UPDATE_TIME, org_name, CREATE_TIME,
        CJLVLX, CJLV, HKFS, HKQX,lv_type,SXYXQ,SXED } = row
    let table = []
    if (RZZT === 1) { //平台拒绝
        table = [
            [{
                width: '15%',
                value: '状态'
            },
            {
                width: '35%',
                value: liucDic[RZZT]
            },
            {
                width: '15%',
                value: '审核时间'
            },
            {
                width: '35%',
                value: UPDATE_TIME ? UPDATE_TIME.slice(0,11) :UPDATE_TIME
            }],
            [{
                width: '15%',
                value: '备注'
            },
            {
                width: '35%',
                value: REMARK
            }]
        ]

    } else if (RZZT === 2) { //金融机构审核中
        table = [
            [{
                width: '15%',
                value: '状态'
            },
            {
                width: '35%',
                value: liucDic[RZZT]
            },
            {
                width: '15%',
                value: '受理机构'
            },
            {
                width: '35%',
                value: org_name
            }]
        ]
    } else if (RZZT === 5) {//5金融机构拒绝
        table = [
            [{
                width: '15%',
                value: '状态'
            },
            {
                width: '35%',
                value: liucDic[RZZT]
            },
            {
                width: '15%',
                value: '受理机构'
            },
            {
                width: '35%',
                value: org_name
            }],
            [{
                width: '15%',
                value: '审核时间'
            },
            {
                width: '35%',
                value: UPDATE_TIME ? UPDATE_TIME.slice(0,11) : UPDATE_TIME
            },
            {
                width: '15%',
                value: '备注'
            },
            {
                width: '35%',
                value: REMARK
            }],
        ]
    } else if(RZZT === 3){ //3贷放款
        table = [
            [{
                width: '15%',
                value: '状态'
            },
            {
                width: '35%',
                value: liucDic[RZZT]
            },
            {
                width: '15%',
                value: '受理机构'
            },
            {
                width: '35%',
                value: org_name
            }],
            [{
                width: '15%',
                value: '授信额度(万元)'
            },
            {
                width: '35%',
                value: SXED
            },
            {
                width: '15%',
                value: '授信额度有效期至'
            },
            {
                width: '35%',
                value: SXYXQ ? SXYXQ.slice(0,11) : SXYXQ
            }],
        ]
    } else {
        table = [
            [{
                width: '15%',
                value: '状态'
            },
            {
                width: '35%',
                value: liucDic[RZZT]
            },
            {
                width: '15%',
                value: '受理机构'
            },
            {
                width: '35%',
                value: org_name
            }],
            [{
                width: '15%',
                value: '授信额度(万元)'
            },
            {
                width: '35%',
                value: SXED
            },
            {
                width: '15%',
                value: '授信额度有效期至'
            },
            {
                width: '35%',
                value: SXYXQ ? SXYXQ.slice(0,11) : SXYXQ
            }],
            [{
                width: '15%',
                value: '金融产品'
            },
            {
                width: '35%',
                value: FKCP
            },
            {
                width: '15%',
                value: '放款金额(万元)'
            },
            {
                width: '35%',
                value: FKJE
            }],
            [{
                width: '15%',
                value: '放款时间'
            },
            {
                width: '35%',
                value: FKRQ ? FKRQ.slice(0,11) : FKRQ
            }, {
                width: '15%',
                value: '成交利率类型'
            },
            {
                width: '35%',
                value: lv_type || cjlvMyObj[CJLVLX]
            }],
            [{
                width: '15%',
                value: '成交利率(%)'
            },
            {
                width: '35%',
                value: CJLV
            }, {
                width: '15%',
                value: '还款期限(个月)'
            },
            {
                width: '35%',
                value: HKQX
            }],
            [{
                width: '15%',
                value: '还款方式'
            },
            {
                width: '35%',
                value: hkfsMobj[HKFS] || HKFS
            }]
        ]
    }
    const data = [{
        tabsLabel: '受理情况',
        table
    }]
    return [..._data, ...data]
}

const editorOotion = {
    // 全局组件名称，使用new VueHtml5Editor(options)时该选项无效 
    // global component name
    name: "vue-html5-editor",
    // 是否显示模块名称，开启的话会在工具栏的图标后台直接显示名称
    // if set true,will append module name to toolbar after icon
    showModuleName: true,
    // 自定义各个图标的class，默认使用的是font-awesome提供的图标
    // custom icon class of built-in modules,default using font-awesome
    icons: {
        text: "fa fa-pencil",
        color: "fa fa-paint-brush",
        font: "fa fa-font",
        align: "fa fa-align-justify",
        list: "fa fa-list",
        link: "fa fa-chain",
        unlink: "fa fa-chain-broken",
        tabulation: "fa fa-table",
        upload: "fa fa-file-image-o",
        hr: "fa fa-minus",
        eraser: "fa fa-eraser",
        undo: "fa-undo fa",
        "full-screen": "fa fa-arrows-alt",
        info: "fa fa-info",
    },
    // 配置图片模块
    // config image module
    image: {
        // 文件最大体积，单位字节  max file size
        sizeLimit: 5120 * 1024,
        // 上传参数,默认把图片转为base64而不上传
        // upload config,default null and convert image to base64
        // upload: {
        //     url: null,
        //     headers: {},
        //     params: {},
        //     fieldName: {}
        // },
        upload: {
            url: process.env.VUE_APP_BASE_API + "/finasm/jrzc/updateFile",
            headers: {
                "Content-Type": "multipart/form-data",
                TOKEN: store.getters.token
            },
            params: {},
            fieldName: 'file'
        },
        // 压缩参数,默认使用localResizeIMG进行压缩,设置为null禁止压缩
        // compression config,default resize image by localResizeIMG (https://github.com/think2011/localResizeIMG)
        // set null to disable compression
        compress: {
            width: 1600,
            height: 1600,
            quality: 80
        },
        // 响应数据处理,最终返回图片链接
        // handle response data，return image url
        uploadHandler(responseText) {
            //default accept json data like  {ok:false,msg:"unexpected"} or {ok:true,data:"image url"}
            var json = JSON.parse(responseText)
            if (!json.ok) {
                alert(json.msg)
            } else {
                return json.data
            }
        }
    },
    // 语言，内建的有英文（en-us）和中文（zh-cn）
    //default en-us, en-us and zh-cn are built-in
    language: "zh-cn",
    // 自定义语言
    i18n: {
        //specify your language here
        "zh-cn": {
            "align": "对齐方式",
            "image": "图片",
            "list": "列表",
            "link": "链接",
            "unlink": "去除链接",
            "table": "表格",
            "font": "文字",
            "full screen": "全屏",
            "text": "排版",
            "eraser": "格式清除",
            "info": "关于",
            "color": "颜色",
            "please enter a url": "请输入地址",
            "create link": "创建链接",
            "bold": "加粗",
            "italic": "倾斜",
            "underline": "下划线",
            "strike through": "删除线",
            "subscript": "上标",
            "superscript": "下标",
            "heading": "标题",
            "font name": "字体",
            "font size": "文字大小",
            "left justify": "左对齐",
            "center justify": "居中",
            "right justify": "右对齐",
            "ordered list": "有序列表",
            "unordered list": "无序列表",
            "fore color": "前景色",
            "background color": "背景色",
            "row count": "行数",
            "column count": "列数",
            "save": "确定",
            "upload": "上传",
            "progress": "进度",
            "unknown": "未知",
            "please wait": "请稍等",
            "error": "错误",
            "abort": "中断",
            "reset": "重置",
            "uplod": "上传图片"
        }
    },
    // 隐藏不想要显示出来的模块
    // the modules you don't want
    hiddenModules: ["image"],
    // 自定义要显示的模块，并控制顺序
    // keep only the modules you want and customize the order.
    // can be used with hiddenModules together
    visibleModules: [
        "text",
        "color",
        "font",
        "align",
        "list",
        "link",
        "uplod",
        "unlink",
        "tabulation",
        "image",
        "hr",
        "eraser",
        "undo",
        "full-screen",
        "info",
    ],
    // 扩展模块，具体可以参考examples或查看源码
    // extended modules
    modules: [
        {
            name: 'uplod',
            icon: 'el-icon-picture',
            i18n: 'uplod',
            show: true,
            init: function (editor) {
                console.log(editor)
                console.log(location.href.includes("localhost:"));
            },
            //vue component :http-request="uploadImg" :on-success="handleAvatarSuccess"
            dashboard: {
                template: `<el-upload class="upload-demo" :action="uploadUrl" :headers="headers" :on-success="handleAvatarSuccess" :show-file-list="false">
                <el-button size="small" type="primary">点击上传</el-button>
                </el-upload>`,
                data: function () {
                    return {
                        imageUrl: '',
                        uploadUrl: process.env.VUE_APP_BASE_API + "/finasm/jrzc/updateFile",
                        headers: "",
                        url: 'https://308266jt49.imdo.co/',//测试环境
                        //url:'https://www.cidata.top/',//正式环境
                    }
                },
                created() {
                    this.headers = { TOKEN: store.getters.token };
                    this.uploadUrl = process.env.VUE_APP_BASE_API + "/finasm/jrzc/updateFile";
                },
                methods: {
                    handleAvatarSuccess(res, file) {
                        console.log('handleAvatarSuccess', res, file)
                        this.imageUrl = `${this.url + res.data}`
                        this.$parent.execCommand('insertHTML', '<img src="' + this.imageUrl + '" style="max-width:100%">')
                    },
                }
            }
        }
    ]
}
const authStatusDic = { //认证状态字典
    0: '全部',
    1: '认证成功',
    3: '认证失败',
}
const creditFinanceIntention_verify = (row) => {
    const { qymc, SHTYXYDM, FDDBR, name, pnumber } = row
    return [{
        tabsLabel: '基本信息',
        table: [
            [{
                width: '15%',
                value: '企业名称'
            },
            {
                width: '35%',
                value: qymc
            },
            {
                width: '15%',
                value: '统一社会信用代码'
            },
            {
                width: '35%',
                value: SHTYXYDM
            }],
            [{
                width: '15%',
                value: '法人姓名'
            },
            {
                width: '35%',
                value: FDDBR
            },
            {
                width: '15%',
                value: '认证发起人'
            },
            {
                width: '35%',
                value: name
            }],
            [{
                width: '15%',
                value: '发起人联系方式'
            },
            {
                width: '35%',
                value: pnumber
            }],
        ]
    }]
}
const viewDataInfo = (row) => {
    const { qymc, tyshxydm, frxm, name, pnumber } = row
    return [{
        tabsLabel: '基本信息',
        table: [
            [{
                width: '15%',
                value: '企业名称'
            },
            {
                width: '35%',
                value: qymc
            },
            {
                width: '15%',
                value: '统一社会信用代码'
            },
            {
                width: '35%',
                value: tyshxydm
            }],
            [{
                width: '15%',
                value: '法人姓名'
            },
            {
                width: '35%',
                value: frxm
            },
            {
                width: '15%',
                value: '认证发起人'
            },
            {
                width: '35%',
                value: name
            }],
            [{
                width: '15%',
                value: '发起人联系方式'
            },
            {
                width: '35%',
                value: pnumber
            }],
        ]
    }]
}
const credit_rzsq_rzsh = (row) => {
    const { qymc, SHTYXYDM, FDDBR, name, pnumber } = row
    return [{
        tabsLabel: '基本信息',
        table: [
            [{
                width: '15%',
                value: '企业名称'
            },
            {
                width: '35%',
                value: qymc
            },
            {
                width: '15%',
                value: '统一社会信用代码'
            },
            {
                width: '35%',
                value: SHTYXYDM
            }],
            [{
                width: '15%',
                value: '法人姓名'
            },
            {
                width: '35%',
                value: FDDBR
            },
            {
                width: '15%',
                value: '认证发起人'
            },
            {
                width: '35%',
                value: name
            }],
            [{
                width: '15%',
                value: '发起人联系方式'
            },
            {
                width: '35%',
                value: pnumber
            }],
        ]
    }]
}
const viewDataInfoTwo = (row) => {
    const { qymc, tyshxydm, frxm, name, pnumber, rzstatus } = row
    return [{
        tabsLabel: '基本信息',
        table: [
            [{
                width: '15%',
                value: '企业名称'
            },
            {
                width: '35%',
                value: qymc
            },
            {
                width: '15%',
                value: '统一社会信用代码'
            },
            {
                width: '35%',
                value: tyshxydm
            }],
            [{
                width: '15%',
                value: '法人姓名'
            },
            {
                width: '35%',
                value: frxm
            },
            {
                width: '15%',
                value: '认证发起人'
            },
            {
                width: '35%',
                value: name
            }],
            [{
                width: '15%',
                value: '发起人联系方式'
            },
            {
                width: '35%',
                value: pnumber
            }, {
                width: '15%',
                value: '认证状态'
            },
            {
                width: '35%',
                value: rzstatus == 0 ? '未认证' : rzstatus == 1 ? '认证成功' : rzstatus == 2 ? '认证审核中' : '认证审核失败'
            }],
        ]
    }]
}

export {
    //rzztDic,
    activeList,
    rzStatusDic,
    sqStatusDic_zx,
    rzStatusDic_zx,
    sqStatusDic,
    editorOotion,
    qyRzStatusDic,
    liuDic_zx,
    createStepList,
    createTableData_orgFinanceApply_verify,
    createTableData_orgFinanceApply_view,
    createTableData_creditFinanceApply_view,
    createTableData_creditFinanceIntention,
    creditFinanceIntention_verify,
    authStatusDic,
    liucDic,
    liuDic_org,
    viewDataInfo,
    viewDataInfoTwo,
    org_rzyx_sh,
    org_rzsq_sh,
    org_rzyx_ck,
    org_rzsq_ck,
    credit_rzyx_ck,
    credit_rzsq_sqsh,
    credit_rzsq_rzsh,
    credit_rzsq_ck,
    org_rzsq_sh_jq,
    org_rzsq_sh_jq_two
}